
<?php
require_once (dirname(__FILE__) . "/include/application.php");
$_GET = magic_gpc($_GET);
$_POST = magic_gpc($_POST);
$_COOKIE = magic_gpc($_COOKIE);
$currefer = uencode(strval($_SERVER["REQUEST_URI"]));
Session::Init();
$INI = ZSystem::GetINI();


if (function_exists("date_default_timezone_set")) {
	date_default_timezone_set($INI["system"]["timezone"]);
}
$currency = $INI["system"]["currency"];
$login_user_id = ZLogin::GetLoginId();
$login_user = Table::Fetch("user", $login_user_id);
$hotcities = option_hotcategory("city", false, true);
$allcities = option_category("city", false, true);
$city = cookie_city(NULL);

if (!isset($_COOKIE["referer"])) {
	setcookie("referer", $_SERVER["HTTP_REFERER"]);
}
if ($_SERVER["SCRIPT_FILENAME"] == __FILE__) {
	redirect(WEB_ROOT . "/index.php");
}
$AJAX = "XMLHttpRequest" == @$_SERVER["HTTP_X_REQUESTED_WITH"];

if (false == $AJAX) {
	header("Content-Type: text/html; charset=UTF-8");
	run_cron();
}
else {
	header("Cache-Control: no-store, no-cache, must-revalidate");
}
$history = get_history();
$history_team = get_history_list($history);
?>